<%@ page import="testportal.AppInstance" %>



<div class="fieldcontain ${hasErrors(bean: appInstanceInstance, field: 'name', 'error')} ">
	<label for="name">
		<g:message code="appInstance.name.label" default="Name" />
		
	</label>
	<g:textField name="name" value="${appInstanceInstance?.name}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: appInstanceInstance, field: 'description', 'error')} ">
	<label for="description">
		<g:message code="appInstance.description.label" default="Description" />
		
	</label>
	<g:textField name="description" value="${appInstanceInstance?.description}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: appInstanceInstance, field: 'active', 'error')} ">
	<label for="active">
		<g:message code="appInstance.active.label" default="Active" />
		
	</label>
	<g:checkBox name="active" value="${appInstanceInstance?.active}" />
</div>

<div class="fieldcontain ${hasErrors(bean: appInstanceInstance, field: 'app', 'error')} required">
	<label for="app">
		<g:message code="appInstance.app.label" default="App" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="app" name="app.id" from="${testportal.App.list()}" optionKey="id" required="" value="${appInstanceInstance?.app?.id}" class="many-to-one"/>
</div>

<div class="fieldcontain ${hasErrors(bean: appInstanceInstance, field: 'environ', 'error')} required">
	<label for="environ">
		<g:message code="appInstance.environ.label" default="Environ" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="environ" name="environ.id" from="${testportal.Environ.list()}" optionKey="id" required="" value="${appInstanceInstance?.environ?.id}" class="many-to-one"/>
</div>

<div class="fieldcontain ${hasErrors(bean: appInstanceInstance, field: 'appLinks', 'error')} ">
	<label for="appLinks">
		<g:message code="appInstance.appLinks.label" default="App Links" />
		
	</label>
	
	<ul class="one-to-many">
	<g:each in="${appInstanceInstance?.appLinks?}" var="a">
	    <li><g:link controller="appLink" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li>
	</g:each>
	<li class="add">
	<g:link controller="appLink" action="create" params="['appInstance.id': appInstanceInstance?.id]">${message(code: 'default.add.label', args: [message(code: 'appLink.label', default: 'AppLink')])}</g:link>
	</li>
	</ul>

</div>

